Map

About

DC Water has historic data for the public portion of the water service line from plumbing records, service installation, and some maintenance activity that was reported to DC Water or another utility agency. Where DC Water has verified the pipe material by test pit or visual observation during a public space and/or private property service line replacement, the data source will be shown as “excavation” and is accurate as of the given inspection date. All other information is based upon historic records, but has not been confirmed. The map reflects the information DC Water has available for each active customer in the District.

DISCLAIMER: The maps provided by the District of Columbia Water and Sewer Authority (“D.C. Water”) are based on historical data, information directly provided by customers, and in some cases, information acquired during physical inspections. DC Water does not guarantee the accuracy of these records and maps, which shall be used for the sole purpose of providing property owners and residents with DC Water’s best available data regarding their private water services, and not for any commercial, legal or other use. These records will be updated constantly as D.C. Water gathers additional information. D.C. Water requests that customers provide to it records of any service line replacements performed by property owners. D.C. Water reserves the right to alter, amend or terminate at any time the display of these maps and records.

For more information, visit:

---
title: "DC Water Service Information"
output: 
  flexdashboard::flex_dashboard:
    navbar:
      - { title: "Data Download", icon: "fa-download", href:  "https://www.dcwater.com/sites/default/files/cleanrivers/service-line.csv", align: right }
    orientation: columns
    vertical_layout: fill
    source_code: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(leaflet)
library(tidyverse)
library(sf)
library(leafgl)

# DC lead data
url <- "https://www.dcwater.com/sites/default/files/cleanrivers/service-line.csv"

# webgl
df <- read_csv(url) %>% 
  janitor::clean_names()

# clean up
df <- df %>% 
  select(premise_address, public_service_material, 
         private_service_material, longitude, latitude) %>% 
  st_as_sf(coords = c("longitude", "latitude"), crs = 4326)

# color points based on lead
lead <- c("Lead_brass", "Iron with lead", "Lead and copper", 
          "Lead", "LEAD AND COPPER", "LEAD\n", 
          "Galvanized iron with lead")

# add colors depending on if lead is present
df <- df %>% 
  mutate(
    public_lead = ifelse(public_service_material %in% lead, 
                         "grey50", "green"),
    public_lead = ifelse(public_service_material == "No information", 
                         "white", public_lead),
    private_lead = ifelse(private_service_material %in% lead, 
                          "grey50", "green"),
    private_lead = ifelse(private_service_material == "No information", 
                          "white", private_lead),
    popup = paste0(
      "Service address: ", premise_address, "
", "Public service material: ", public_service_material, "
", "Private service material: ", private_service_material, "
") ) ``` Map ===================================== ```{r} # make leaflet leaflet() %>% # 4 basemaps addProviderTiles(provider = providers$CartoDB.Positron, group = "Light") %>% addProviderTiles(provider = providers$CartoDB.DarkMatter, group = "Dark") %>% addProviderTiles(provider = providers$OpenStreetMap, group = "Street") %>% addProviderTiles(provider = providers$Esri.WorldImagery, group = "World") %>% # public lead points addGlPoints( data = filter(df, public_lead == "grey50"), fillColor = "public_lead", fillOpacity = 1, radius = 20, group = "Lead" ) %>% # public no lead points addGlPoints( data = filter(df, public_lead != "grey50"), fillColor = "public_lead", fillOpacity = 1, radius = 20, group = "No lead" ) %>% # private lead points addGlPoints( data = filter(df, private_lead == "grey50"), fillColor = "private_lead", fillOpacity = 1, radius = 10, popup = "popup", group = "Lead" ) %>% # private no lead points addGlPoints( data = filter(df, private_lead != "grey50"), fillColor = "private_lead", fillOpacity = 1, radius = 10, popup = "popup", group = "No lead" ) %>% flyTo(lng = mean(st_coordinates(df)[, 1]), lat = mean(st_coordinates(df)[, 2]), zoom = 12) %>% leaflet.extras::suspendScroll() %>% leaflegend::addLegendImage( images = "legend.png", labels = "", title = htmltools::tags$div( "Legend", style = "font-size: 16px; text-align: center; margin-bottom: 5px;"), position = "topright", orientation = "vertical", height = 165, width = 180) %>% addLayersControl( overlayGroups = c("Lead", "Lead", "No lead"), baseGroups = c("Light", "Dark", "Street", "World"), options = layersControlOptions(collapsed = FALSE), position = "topright" ) ``` About ===================================== DC Water has historic data for the public portion of the water service line from plumbing records, service installation, and some maintenance activity that was reported to DC Water or another utility agency. Where DC Water has verified the pipe material by test pit or visual observation during a public space and/or private property service line replacement, the data source will be shown as "excavation" and is accurate as of the given inspection date. All other information is based upon historic records, but has not been confirmed. The map reflects the information DC Water has available for each active customer in the District. **DISCLAIMER**: The maps provided by the District of Columbia Water and Sewer Authority (“D.C. Water”) are based on historical data, information directly provided by customers, and in some cases, information acquired during physical inspections. DC Water does not guarantee the accuracy of these records and maps, which shall be used for the sole purpose of providing property owners and residents with DC Water’s best available data regarding their private water services, and not for any commercial, legal or other use. These records will be updated constantly as D.C. Water gathers additional information. D.C. Water requests that customers provide to it records of any service line replacements performed by property owners. D.C. Water reserves the right to alter, amend or terminate at any time the display of these maps and records. For more information, visit: - [Service Lines - Fact Sheet](https://www.dcwater.com/faq-page/74) - [DC Water Lead information](https://www.dcwater.com/Lead)